3.3.19 \(\int \frac {a+b \log (c x^n)}{x^2 (d+e x^2)} \, dx\) [219]

Optimal. Leaf size=134 \[ -\frac {b n}{d x}-\frac {a+b \log \left (c x^n\right )}{d x}-\frac {\sqrt {e} \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{d^{3/2}}+\frac {i b \sqrt {e} n \text {Li}_2\left (-\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{2 d^{3/2}}-\frac {i b \sqrt {e} n \text {Li}_2\left (\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{2 d^{3/2}} \]

[Out]

-b*n/d/x+(-a-b*ln(c*x^n))/d/x-arctan(x*e^(1/2)/d^(1/2))*(a+b*ln(c*x^n))*e^(1/2)/d^(3/2)+1/2*I*b*n*polylog(2,-I
*x*e^(1/2)/d^(1/2))*e^(1/2)/d^(3/2)-1/2*I*b*n*polylog(2,I*x*e^(1/2)/d^(1/2))*e^(1/2)/d^(3/2)

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 134, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {2380, 2341, 211, 2361, 12, 4940, 2438} \begin {gather*} \frac {i b \sqrt {e} n \text {PolyLog}\left (2,-\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{2 d^{3/2}}-\frac {i b \sqrt {e} n \text {PolyLog}\left (2,\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{2 d^{3/2}}-\frac {\sqrt {e} \text {ArcTan}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{d^{3/2}}-\frac {a+b \log \left (c x^n\right )}{d x}-\frac {b n}{d x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])/(x^2*(d + e*x^2)),x]

[Out]

-((b*n)/(d*x)) - (a + b*Log[c*x^n])/(d*x) - (Sqrt[e]*ArcTan[(Sqrt[e]*x)/Sqrt[d]]*(a + b*Log[c*x^n]))/d^(3/2) +
 ((I/2)*b*Sqrt[e]*n*PolyLog[2, ((-I)*Sqrt[e]*x)/Sqrt[d]])/d^(3/2) - ((I/2)*b*Sqrt[e]*n*PolyLog[2, (I*Sqrt[e]*x
)/Sqrt[d]])/d^(3/2)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2361

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> With[{u = IntHide[1/(d + e*x^2),
 x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[u/x, x], x]] /; FreeQ[{a, b, c, d, e, n}, x]

Rule 2380

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.))/((d_) + (e_.)*(x_)^(r_.)), x_Symbol] :> Dist[1/d,
 Int[x^m*(a + b*Log[c*x^n])^p, x], x] - Dist[e/d, Int[(x^(m + r)*(a + b*Log[c*x^n])^p)/(d + e*x^r), x], x] /;
FreeQ[{a, b, c, d, e, m, n, r}, x] && IGtQ[p, 0] && IGtQ[r, 0] && ILtQ[m, -1]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4940

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[I*(b/2), Int[Log[1 - I*c*x
]/x, x], x] - Dist[I*(b/2), Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rubi steps

\begin {align*} \int \frac {a+b \log \left (c x^n\right )}{x^2 \left (d+e x^2\right )} \, dx &=\int \left (\frac {a+b \log \left (c x^n\right )}{d x^2}-\frac {e \left (a+b \log \left (c x^n\right )\right )}{d \left (d+e x^2\right )}\right ) \, dx\\ &=\frac {\int \frac {a+b \log \left (c x^n\right )}{x^2} \, dx}{d}-\frac {e \int \frac {a+b \log \left (c x^n\right )}{d+e x^2} \, dx}{d}\\ &=-\frac {b n}{d x}-\frac {a+b \log \left (c x^n\right )}{d x}-\frac {\sqrt {e} \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{d^{3/2}}+\frac {(b e n) \int \frac {\tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d} \sqrt {e} x} \, dx}{d}\\ &=-\frac {b n}{d x}-\frac {a+b \log \left (c x^n\right )}{d x}-\frac {\sqrt {e} \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{d^{3/2}}+\frac {\left (b \sqrt {e} n\right ) \int \frac {\tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{x} \, dx}{d^{3/2}}\\ &=-\frac {b n}{d x}-\frac {a+b \log \left (c x^n\right )}{d x}-\frac {\sqrt {e} \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{d^{3/2}}+\frac {\left (i b \sqrt {e} n\right ) \int \frac {\log \left (1-\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{x} \, dx}{2 d^{3/2}}-\frac {\left (i b \sqrt {e} n\right ) \int \frac {\log \left (1+\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{x} \, dx}{2 d^{3/2}}\\ &=-\frac {b n}{d x}-\frac {a+b \log \left (c x^n\right )}{d x}-\frac {\sqrt {e} \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{d^{3/2}}+\frac {i b \sqrt {e} n \text {Li}_2\left (-\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{2 d^{3/2}}-\frac {i b \sqrt {e} n \text {Li}_2\left (\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{2 d^{3/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.10, size = 173, normalized size = 1.29 \begin {gather*} \frac {d \left (-2 b (-d)^{3/2} n+2 \sqrt {-d} d \left (a+b \log \left (c x^n\right )\right )-d \sqrt {e} x \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )+d \sqrt {e} x \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {d \sqrt {e} x}{(-d)^{3/2}}\right )+b d \sqrt {e} n x \text {Li}_2\left (\frac {\sqrt {e} x}{\sqrt {-d}}\right )-b d \sqrt {e} n x \text {Li}_2\left (\frac {d \sqrt {e} x}{(-d)^{3/2}}\right )\right )}{2 (-d)^{7/2} x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])/(x^2*(d + e*x^2)),x]

[Out]

(d*(-2*b*(-d)^(3/2)*n + 2*Sqrt[-d]*d*(a + b*Log[c*x^n]) - d*Sqrt[e]*x*(a + b*Log[c*x^n])*Log[1 + (Sqrt[e]*x)/S
qrt[-d]] + d*Sqrt[e]*x*(a + b*Log[c*x^n])*Log[1 + (d*Sqrt[e]*x)/(-d)^(3/2)] + b*d*Sqrt[e]*n*x*PolyLog[2, (Sqrt
[e]*x)/Sqrt[-d]] - b*d*Sqrt[e]*n*x*PolyLog[2, (d*Sqrt[e]*x)/(-d)^(3/2)]))/(2*(-d)^(7/2)*x)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.14, size = 531, normalized size = 3.96

method result size
risch \(\frac {b e \arctan \left (\frac {x e}{\sqrt {e d}}\right ) n \ln \left (x \right )}{d \sqrt {e d}}-\frac {b e \arctan \left (\frac {x e}{\sqrt {e d}}\right ) \ln \left (x^{n}\right )}{d \sqrt {e d}}-\frac {b \ln \left (x^{n}\right )}{d x}-\frac {b n e \ln \left (x \right ) \ln \left (\frac {-e x +\sqrt {-e d}}{\sqrt {-e d}}\right )}{2 d \sqrt {-e d}}+\frac {b n e \ln \left (x \right ) \ln \left (\frac {e x +\sqrt {-e d}}{\sqrt {-e d}}\right )}{2 d \sqrt {-e d}}-\frac {b n e \dilog \left (\frac {-e x +\sqrt {-e d}}{\sqrt {-e d}}\right )}{2 d \sqrt {-e d}}+\frac {b n e \dilog \left (\frac {e x +\sqrt {-e d}}{\sqrt {-e d}}\right )}{2 d \sqrt {-e d}}-\frac {b n}{d x}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{2 d x}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{2 d x}+\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{2 d x}-\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} e \arctan \left (\frac {x e}{\sqrt {e d}}\right )}{2 d \sqrt {e d}}-\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} e \arctan \left (\frac {x e}{\sqrt {e d}}\right )}{2 d \sqrt {e d}}+\frac {i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3} e \arctan \left (\frac {x e}{\sqrt {e d}}\right )}{2 d \sqrt {e d}}-\frac {i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{2 d x}+\frac {i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) e \arctan \left (\frac {x e}{\sqrt {e d}}\right )}{2 d \sqrt {e d}}-\frac {b \ln \left (c \right ) e \arctan \left (\frac {x e}{\sqrt {e d}}\right )}{d \sqrt {e d}}-\frac {b \ln \left (c \right )}{d x}-\frac {a e \arctan \left (\frac {x e}{\sqrt {e d}}\right )}{d \sqrt {e d}}-\frac {a}{d x}\) \(531\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))/x^2/(e*x^2+d),x,method=_RETURNVERBOSE)

[Out]

b*e/d/(e*d)^(1/2)*arctan(x*e/(e*d)^(1/2))*n*ln(x)-b*e/d/(e*d)^(1/2)*arctan(x*e/(e*d)^(1/2))*ln(x^n)-b*ln(x^n)/
d/x-1/2*b*n*e/d/(-e*d)^(1/2)*ln(x)*ln((-e*x+(-e*d)^(1/2))/(-e*d)^(1/2))+1/2*b*n*e/d/(-e*d)^(1/2)*ln(x)*ln((e*x
+(-e*d)^(1/2))/(-e*d)^(1/2))-1/2*b*n*e/d/(-e*d)^(1/2)*dilog((-e*x+(-e*d)^(1/2))/(-e*d)^(1/2))+1/2*b*n*e/d/(-e*
d)^(1/2)*dilog((e*x+(-e*d)^(1/2))/(-e*d)^(1/2))-b*n/d/x+1/2*I*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)/d/x-1/2
*I*b*Pi*csgn(I*c)*csgn(I*c*x^n)^2/d/x+1/2*I*b*Pi*csgn(I*c*x^n)^3/d/x-1/2*I*b*Pi*csgn(I*c)*csgn(I*c*x^n)^2*e/d/
(e*d)^(1/2)*arctan(x*e/(e*d)^(1/2))-1/2*I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2*e/d/(e*d)^(1/2)*arctan(x*e/(e*d)^(1
/2))+1/2*I*b*Pi*csgn(I*c*x^n)^3*e/d/(e*d)^(1/2)*arctan(x*e/(e*d)^(1/2))-1/2*I*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2
/d/x+1/2*I*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*e/d/(e*d)^(1/2)*arctan(x*e/(e*d)^(1/2))-b*ln(c)*e/d/(e*d)^
(1/2)*arctan(x*e/(e*d)^(1/2))-b*ln(c)/d/x-a*e/d/(e*d)^(1/2)*arctan(x*e/(e*d)^(1/2))-a/d/x

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x^2/(e*x^2+d),x, algorithm="maxima")

[Out]

-a*(arctan(x*e^(1/2)/sqrt(d))*e^(1/2)/d^(3/2) + 1/(d*x)) + b*integrate((log(c) + log(x^n))/(x^4*e + d*x^2), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x^2/(e*x^2+d),x, algorithm="fricas")

[Out]

integral((b*log(c*x^n) + a)/(x^4*e + d*x^2), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a + b \log {\left (c x^{n} \right )}}{x^{2} \left (d + e x^{2}\right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))/x**2/(e*x**2+d),x)

[Out]

Integral((a + b*log(c*x**n))/(x**2*(d + e*x**2)), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x^2/(e*x^2+d),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)/((x^2*e + d)*x^2), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {a+b\,\ln \left (c\,x^n\right )}{x^2\,\left (e\,x^2+d\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*x^n))/(x^2*(d + e*x^2)),x)

[Out]

int((a + b*log(c*x^n))/(x^2*(d + e*x^2)), x)

________________________________________________________________________________________